package com.xiaotu.common.util;

import java.util.List;

public class Contour {

    private List<Point> pointList;
    
    

	public List<Point> getPointList() {
		return pointList;
	}



	public void setPointList(List<Point> pointList) {
		this.pointList = pointList;
	}



	@Override
    public boolean equals(Object obj) {
        if(obj==null){
            return false;
        }
        if(this==obj){
            return true;
        }
        
        if(obj instanceof Contour){
        	Contour contour=(Contour) obj;
        	List<Point> pointList = contour.getPointList();
        	if(pointList==null && this.pointList==null) {
        		return true;
        	}

        	if(pointList.size() == this.pointList.size()) {
        		for(int i=0;i<pointList.size();i++) {
        			Point point = pointList.get(i);
        			Point thisPoint = this.pointList.get(i);
        			if(!point.equals(thisPoint)) {
        				return false;
        			}           			
        		}
        		return true;
        	}else {
        		return false;
        	}
        }
        return false;
    }
    
}